import Vue from 'vue'
import VueRouter from 'vue-router'

import login from '../components/login.vue'


Vue.use(VueRouter)

const routes = [
  {
    // 重定向
    path: '/',
    redirect: '/login'
  },
  {

    path: '/login',
    component: login,

  }
]
const router = new VueRouter({
  mode: 'history',
  routes // (缩写) 相当于 routes: routes
})

export default router
